<template>
    <el-dialog 
        :visible.sync="isVisible"
        title="中奖记录" 
        :close-on-click-modal='false'
        :close-on-press-escape='false'
        :modal-append-to-body="false"
        @close="closeDialog">
        <div class="form">
            <el-card v-for="item in areaData" :key="item.id" shadow="always">
                <el-row>
                    日期：{{item.today}}
                </el-row>
                <el-row style="margin-top: 10px;">
                    中奖人手机号：{{item.mobile}}
                </el-row>
            </el-card>
        </div>
    </el-dialog>
</template>

<script>
   import { mapState, mapGetters } from 'vuex'
   import { getPrizeList } from "@/api/goods";
   import AreaJson from "@/assets/datas/area.json"

  export default {
      name:'addFundDialogs',
      data(){
          return {
            areaData:[],
            isVisible: this.isShow,
            //详情弹框信息
            dialog: {
                width:'400px',
                formLabelWidth:'120px'
            }
          }
      },
      props:{
          isShow:Boolean,
          dialogRow:Object
      },
      mounted(){
          this.getData();
      },
      methods:{
         
          closeDialog(){
              this.$emit('closeDialog');
          },

          getData() {
              let param = {goodsId: this.dialogRow.id}
              getPrizeList(param).then(res => {
                  this.areaData = res.data.list;
                  console.log(this.areaData);
                  console.log(res);
              })
          }
      }
  }
</script>

<style lang="less" scoped>
    .search_container{
        margin-bottom: 20px;
    }
    .btnRight{
        float: right;
        margin-right: 0px !important;
    }
    .searchArea{
        background:rgba(255,255,255,1);
        border-radius:2px;
        padding: 18px 18px 0;
    }
    .el-card{
        margin-bottom: 10px;
    }
</style>
